﻿@Html.Action("LeaderCarListPartialView")
<br />

<table>
    <tr>
        <td>
            @Html.DevExpress().Button(settings =>
{
    settings.Name = "Button1";
    settings.Text = "增加记录";
    settings.Width = 120;
    settings.ControlStyle.CssClass = "button1";
    settings.ClientSideEvents.Click = "function(s, e){edit(); }";
}).GetHtml()
        </td>
        <td>
            @Html.DevExpress().Button(settings =>
{
    settings.Name = "Button2";
    settings.Text = "导出Excel";
    settings.Width = 100;
    settings.ControlStyle.CssClass = "button1";
    settings.ClientSideEvents.Click = "function(s, e){ location.href='" + @Url.Action("LeaderCarExport", "Table",Html.ViewContext.RouteData.Values) + "' }";
}).GetHtml()
        </td>
    </tr>
</table>



<script type="text/javascript">
    var dept = null;
    function edit(id) {
        dept = id;
        pcModalModeLeader.Show();
    };
    function OnBeginCallback(s, e) {
        e.customArgs["id"] = dept;
        dept = null;
    };
    function OnEndCallback(s, e) {
    };
</script>

@Html.DevExpress().PopupControl(
settings =>
{
    settings.Name = "pcModalModeLeader";
    settings.CallbackRouteValues = new { Controller = "Table", Action = "LeaderCarEdit"};
    settings.Width = 610;
    settings.Height = 350;
    settings.InitDefaultSettings();
    settings.HeaderText = "车辆GPS安装信息信息编辑";
}).GetHtml()
